home *** CD-ROM | disk | FTP | other *** search
/ Champak 146 / (Vol 146) Jan 07 2012.iso / Games / screamin_upstreamin.swf / scripts / DefineSprite_184 / frame_1 / PlaceObject3_183_75 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2012-01-07  |  766b  |  28 lines

  1. onClipEvent(enterFrame){
  2.    if(_root.level > 3)
  3.    {
  4.       if(_Y > 275)
  5.       {
  6.          this.gotoAndstop(1);
  7.       }
  8.       if(_Y >= occurrence)
  9.       {
  10.          var occurrence = Math.round(Math.random() * frequency) + 300;
  11.          var xPos = -110 + Math.round(Math.random() * xPosVara);
  12.          _Y = startPos;
  13.          _X = xPos;
  14.          _root.smallCarSpeed2 = 10;
  15.          hitObject = "on";
  16.       }
  17.       else if(_Y <= occurrence * -1)
  18.       {
  19.          var occurrence = Math.round(Math.random() * frequency) + 300;
  20.          var xPos = -110 + Math.round(Math.random() * xPosVara);
  21.          _Y = startPos * -1;
  22.          _X = xPos;
  23.          hitObject = "on";
  24.       }
  25.       _Y = _Y + (- _root.smallCarSpeed2) + _root.busSpeed / 2;
  26.    }
  27. }
  28.